Warning cleanpus from Conrad.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 6 Oct 2013 21:12:04 +0000 (21:12 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 6 Oct 2013 21:12:04 +0000 (21:12 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4631 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/defs.h
gpsbabel/gpx.cc
gpsbabel/magproto.cc
gpsbabel/mapsource.cc

index 98cabc210beeaf6120d55de3e2dfbce2c49397a3..5694da8b02612f37fdad8cd83fddfa614285e6a1 100644 (file)
@@ -828,7 +828,7 @@ void setshort_is_utf8(short_handle h, const int is_utf8);
 #define ARGTYPE_FLAGMASK 0xfffff000
 
 #define ARG_NOMINMAX NULL, NULL
-#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX}
+#define ARG_TERMINATOR {0, 0, 0, 0, 0, ARG_NOMINMAX, NULL}
 
 typedef struct arglist {
   const char* argstring;
@@ -878,6 +878,8 @@ typedef struct position_ops {
   ff_deinit wr_deinit;
 } position_ops_t;
 
+#define NULL_POS_OPS { 0, 0, 0, 0, 0, 0, }
+
 /*
  *  Describe the file format to the caller.
  */
index b451f1786414021e8af0fd6e661741304955eddb..c4ee42d5e23982cd86d1f8ffc6b64fe14744f99d 100644 (file)
@@ -1670,7 +1670,7 @@ gpx_track_disp(const waypoint* waypointp)
 }
 
 static void
-gpx_track_tlr(const route_head* rte)
+gpx_track_tlr(const route_head*)
 {
   if (!QUEUE_EMPTY(&current_trk_head->waypoint_list)) {
     writer->writeEndElement();
@@ -1737,7 +1737,7 @@ gpx_route_disp(const waypoint* waypointp)
 }
 
 static void
-gpx_route_tlr(const route_head* rte)
+gpx_route_tlr(const route_head*)
 {
   writer->writeEndElement(); // Close rte tag.
 }
@@ -1895,35 +1895,35 @@ static
 arglist_t gpx_args[] = {
   {
     "snlen", &snlen, "Length of generated shortnames",
-    "32", ARGTYPE_INT, "1", NULL
+    "32", ARGTYPE_INT, "1", NULL, NULL
   },
   {
     "suppresswhite", &suppresswhite,
     "No whitespace in generated shortnames",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "logpoint", &opt_logpoint,
     "Create waypoints from geocache log entries",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "urlbase", &urlbase, "Base URL for link tag in output",
-    NULL, ARGTYPE_STRING, ARG_NOMINMAX
+    NULL, ARGTYPE_STRING, ARG_NOMINMAX, NULL
   },
   {
     "gpxver", &gpx_wversion, "Target GPX version for output",
-    NULL, ARGTYPE_STRING, ARG_NOMINMAX
+    NULL, ARGTYPE_STRING, ARG_NOMINMAX, NULL
   },
   {
     "humminbirdextensions", &opt_humminbirdext,
     "Add info (depth) as Humminbird extension",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "garminextensions", &opt_garminext,
     "Add info (depth) as Garmin extension",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   ARG_TERMINATOR
 };
@@ -1939,5 +1939,7 @@ ff_vecs_t gpx_vecs = {
   gpx_write,
   gpx_exit,
   gpx_args,
-  CET_CHARSET_UTF8, 0  /* non-fixed to create non UTF-8 XML's for testing | CET-REVIEW */
+  CET_CHARSET_UTF8, 0, /* non-fixed to create non UTF-8 XML's for testing | CET-REVIEW */
+  NULL_POS_OPS,
+  NULL,
 };
index 0ab1d0b63a82b65de651dad8d0342f153970b4a5..34150118922c6cd5c3ff18d4f6f3700a8e90deaf 100644 (file)
@@ -679,23 +679,23 @@ static
 arglist_t mag_sargs[] = {
   {
     "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
-    ARG_NOMINMAX
+    ARG_NOMINMAX, NULL
   },
   {
     "maxcmts", &cmts, "Max number of comments to write (maxcmts=200)",
-    "200", ARGTYPE_INT, ARG_NOMINMAX
+    "200", ARGTYPE_INT, ARG_NOMINMAX, NULL
   },
   {
     "baud", &bs, "Numeric value of bitrate (baud=4800)", "4800",
-    ARGTYPE_INT, ARG_NOMINMAX
+    ARGTYPE_INT, ARG_NOMINMAX, NULL
   },
   {
     "noack", &noack, "Suppress use of handshaking in name of speed",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "nukewpt", &nukewpt, "Delete all waypoints", NULL, ARGTYPE_BOOL,
-    ARG_NOMINMAX
+    ARG_NOMINMAX, NULL
   },
   ARG_TERMINATOR
 };
@@ -704,11 +704,11 @@ static
 arglist_t mag_fargs[] = {
   {
     "deficon", &deficon, "Default icon name", NULL, ARGTYPE_STRING,
-    ARG_NOMINMAX
+    ARG_NOMINMAX, NULL
   },
   {
     "maxcmts", &cmts, "Max number of comments to write (maxcmts=200)",
-    NULL, ARGTYPE_INT, ARG_NOMINMAX
+    NULL, ARGTYPE_INT, ARG_NOMINMAX, NULL
   },
   ARG_TERMINATOR
 };
@@ -987,6 +987,7 @@ mag_trkparse(char* trkmsg)
   lngdir = ifield[4][0];
   alt = atof(ifield[5]);
   altunits = ifield[6][0];
+  (void)altunits;
   sscanf(ifield[7], "%d.%d", &hms, &fracsecs);
   /* Field 8 is constant */
   /* Field nine is optional track name */
@@ -1030,7 +1031,6 @@ mag_trkparse(char* trkmsg)
 void
 mag_rteparse(char* rtemsg)
 {
-  char descr[100];
   int n;
   int frags,frag,rtenum;
   char xbuf[100],next_stop[100],abuf[100];
@@ -1040,7 +1040,6 @@ mag_rteparse(char* rtemsg)
   char* p;
   char* rte_name = NULL;
 
-  descr[0] = 0;
 #if 0
   sscanf(rtemsg,"$PMGNRTE,%d,%d,%c,%d%n",
          &frags,&frag,xbuf,&rtenum,&n);
@@ -1431,7 +1430,7 @@ mag_waypt_pr(const waypoint* waypointp)
 }
 
 static
-void mag_track_nop(const route_head* rte)
+void mag_track_nop(const route_head*)
 {
   return;
 }
@@ -1577,7 +1576,7 @@ mag_route_trl(const route_head* rte)
 }
 
 static void
-mag_route_hdr(const route_head* rh)
+mag_route_hdr(const route_head*)
 {
 }
 
@@ -1656,7 +1655,9 @@ ff_vecs_t mag_svecs = {
   mag_write,
   NULL,
   mag_sargs,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
+  CET_CHARSET_ASCII, 0,        /* CET-REVIEW */
+  NULL_POS_OPS,
+  NULL,
 };
 
 ff_vecs_t mag_fvecs = {
@@ -1670,7 +1671,9 @@ ff_vecs_t mag_fvecs = {
   mag_write,
   NULL,
   mag_fargs,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
+  CET_CHARSET_ASCII, 0,        /* CET-REVIEW */
+  NULL_POS_OPS,
+  NULL,
 };
 
 /*
@@ -1687,5 +1690,7 @@ ff_vecs_t magX_fvecs = {
   mag_write,
   NULL,
   mag_fargs,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
+  CET_CHARSET_ASCII, 0,        /* CET-REVIEW */
+  NULL_POS_OPS,
+  NULL,
 };
index 60702429521ef4e2b0c4c758560b9fdce903daaa..5c11dfdda799ba3faceefe477ed236cd44ad42f6 100644 (file)
@@ -77,35 +77,38 @@ static char* mpsuseprox = NULL;
 
 static
 arglist_t mps_args[] = {
-  {"snlen", &snlen, "Length of generated shortnames", "10", ARGTYPE_INT, "1", NULL },
+  {
+    "snlen", &snlen, "Length of generated shortnames", "10", ARGTYPE_INT, "1",
+    NULL, NULL
+  },
   {
     "snwhite", &snwhiteopt, "Allow whitespace synth. shortnames",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "mpsverout", &mpsverout,
     "Version of mapsource file to generate (3,4,5)", NULL,
-    ARGTYPE_INT, ARG_NOMINMAX
+    ARGTYPE_INT, ARG_NOMINMAX, NULL
   },
   {
     "mpsmergeout", &mpsmergeouts, "Merge output with existing file",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "mpsusedepth", &mpsusedepth,
     "Use depth values on output (default is ignore)", NULL,
-    ARGTYPE_BOOL, ARG_NOMINMAX
+    ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   {
     "mpsuseprox", &mpsuseprox,
     "Use proximity values on output (default is ignore)",
-    NULL, ARGTYPE_BOOL, ARG_NOMINMAX
+    NULL, ARGTYPE_BOOL, ARG_NOMINMAX, NULL
   },
   ARG_TERMINATOR
 };
 
 static void
-mps_noop(const route_head* wp)
+mps_noop(const route_head*)
 {
   /* no-op */
 }
@@ -429,6 +432,8 @@ mps_mapsegment_r(gbfile* mps_file, int mps_ver)
 {
   int reclen;
 
+  (void)mps_ver;
+
 #if 0
   /* At the moment we're not doing anything with map segments, but here's the template code as if we were */
   char hdr[100];
@@ -464,6 +469,8 @@ mps_mapsetname_r(gbfile* mps_file, int mps_ver)
 {
   int reclen;
 
+  (void)mps_ver;
+
   /* At the moment we're not doing anything with mapsetnames, but here's the template code as if we were
   char hdr[100];
   mps_readstr(mps_file, hdr, sizeof(hdr));
@@ -490,6 +497,8 @@ mps_mapsetname_w(gbfile* mps_file, int mps_ver)
   char hdr[100];
   int reclen;
 
+  (void)mps_ver;
+
   hdr[0] = 'V';        /* mapsetname start of record indicator                 */
   hdr[1] = 0;          /* zero length null terminated string                   */
   hdr[2] = 1;          /* mapsetname autoname flag set to DO autoname  */
@@ -944,6 +953,7 @@ mps_route_r(gbfile* mps_file, int mps_ver, route_head** rte)
 #endif
 
     mpsclass = gbfgetint32(mps_file);                  /* class */
+    (void)mpsclass;
     mps_readstr(mps_file, tbuf, sizeof(tbuf)); /* country */
 
     if ((mps_ver == 4) || (mps_ver == 5)) {
@@ -1456,6 +1466,7 @@ mps_routetrlr_w(gbfile* mps_file, int mps_ver, const route_head* rte)
   char         hdr[2];
   int                  value = 0;
 
+  (void)mps_ver;
   hdr[0] = 1;
 
   if (rte->waypoint_list.next) {               /* this test doesn't do what I want i.e test if this is a valid route - treat as a placeholder for now */
@@ -1490,6 +1501,8 @@ mps_track_r(gbfile* mps_file, int mps_ver, route_head** trk)
   double       mps_altitude = unknown_alt;
   double       mps_depth = unknown_alt;
 
+  (void)mps_ver;
+
   trkname = gbfgetcstr(mps_file);
 #ifdef MPS_DEBUG
   fprintf(stderr, "mps_track_r: reading track %s\n", trkname);
@@ -1575,6 +1588,8 @@ mps_trackhdr_w(gbfile* mps_file, int mps_ver, const route_head* trk)
 
   queue* elem, *tmp;
 
+  (void)mps_ver;
+
   /* total nodes (waypoints) this track */
   trk_datapoints = 0;
   if (trk->waypoint_list.next) {       /* this test doesn't do what I want i.e test if this is a valid track - treat as a placeholder for now */
@@ -1642,6 +1657,8 @@ mps_trackdatapoint_w(gbfile* mps_file, int mps_ver, const waypoint* wpt)
   double       mps_altitude = wpt->altitude;
   double       mps_depth = unknown_alt;
 
+  (void)mps_ver;
+
   lat = GPS_Math_Deg_To_Semi(wpt->latitude);
   lon = GPS_Math_Deg_To_Semi(wpt->longitude);
   if (WAYPT_HAS(wpt, depth) && mpsusedepth) {
@@ -2093,5 +2110,7 @@ ff_vecs_t mps_vecs = {
   mps_write,
   NULL,
   mps_args,
-  CET_CHARSET_MS_ANSI  /* CET-REVIEW */
+  CET_CHARSET_MS_ANSI, 0,      /* CET-REVIEW */
+  NULL_POS_OPS,
+  NULL,
 };